Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature remote debugger #1162

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

pascal-fb-martin
Copy link

This is a small set of changes in the Debugger plugin to support gdb's remote mode (using gdbserver on the remote side). An additional cross development mode launches gdb-multiarch instead of gdb, so that an amd64 workstation can be used to debug a target running on an ARM board, or any other combination supported by gdb-multiarch.

Large portion of the changes is to adjust the debugger Target page, so that the debug mode is explicit and visible. In addition the label flip-flop between Command line Arguments and Remote Address to reflect how the field is actually used.

The --multi option of gdbserver is not supported. Doing so might require modifying the GUI, among other impacts.

A French translation is provided for the new labels. Since I am not familiar with the internationalization tools, I just hand-made a few more entries. Feel free to correct if that was not the right way.

@elextr
Copy link
Member

elextr commented Jan 30, 2022

Although the debugger plugin is marked as maintained, AFAICT there has been no input from the "maintainer" for a long time, so probably in practice it is orphaned.

So anybody (other than @pascal-fb-martin :-) who is interested in this needs to code review and test.

@pascal-fb-martin
Copy link
Author

pascal-fb-martin commented Jan 30, 2022

As a side note: I am experiencing issues with the gdb's thread handling when using gdb-multiarch. I implemented a quick workaround. I found that I am not the only one with this thread issues, so it most likely not related to geany or the Debugger plugin itself.

Also gdb is not finding OS libraries or header files for the target OS (not finding a thread library might trigger the first issue, actually). I think that might be because I compiled the code under debug native on the Raspberry Pi and the cross compiler is not present on my desktop PC (this is a lot simpler than installing a cross compiler :-).

I use geany on the desktop because the Raspberry Pi has no display, and no GUI environment is installed. Not to mention that a Raspeberry Pi Zero may be slow for geany..

Still the Debugger plugin is usable in this border case, when cautious (most problems are with steps, breakpoints seem OK).

@pascal-fb-martin
Copy link
Author

These two last commits resolve all the issues that I have experienced so far in remote/cross debugging mode. The Debugger plugin now behaves nicely (at least to my taste).

(The fact that gdb does not retrieve on the desktop machine the sources and libraries that it needs is not the plugin's fault, only an artefact of my weird setup.)

@andy5995
Copy link
Contributor

So anybody (other than @pascal-fb-martin :-) who is interested in this needs to code review and test.

@pascal-fb-martin I could test this but I think you'll need to rebase first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants